-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #38107 - Booted container images page #11269
Conversation
It looks like I can't use the Foreman React Table component due to the expandable rows. That component sticks children inside a
|
ef686fc
to
d861aea
Compare
const BootedContainerImagesPage = () => { | ||
const columns = { | ||
image_name: { | ||
title: __('Image name'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change this to Bootc - booted image name so it's also easier to figure out the serach query?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed all of the references to image_name to bootc_booted_image like in the API.
So we don't forget after the break, the bookmarks controller needs some love on the page to work.. |
85536ed
to
7ac103d
Compare
Sorting support is in! |
f634101
to
5c0f7d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed bookmarks and tidied up some things.
Empty state is still broken and I'm a little confused, and the table doesn't match the mock-up perfectly. Details below:
webpack/scenes/BootedContainerImages/BootedContainerImagesPage.js
Outdated
Show resolved
Hide resolved
5c0f7d4
to
5af40f2
Compare
); | ||
})} | ||
</TableComposable> | ||
{results.length > 0 && !errorMessage && bottomPagination} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More readable to not have bottomPagination
and render the Pagination component directly here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
654bb12
to
9b2397c
Compare
I just pushed a fix for the rows all expanding at once. |
webpack/scenes/BootedContainerImages/BootedContainerImagesPage.js
Outdated
Show resolved
Hide resolved
webpack/scenes/BootedContainerImages/__tests__/bootedContainerImagesPage.test.js
Show resolved
Hide resolved
Empty state is fixed, the nav capitalization is fixed, and I made some more testing progress. |
81dfd4d
to
68d69da
Compare
Code looks good to me..Functionally it is working great..Pagination, bookmarking, searches, empty states etc work good on the page. I'll play some more and let @jeremylenz take a final look at the code in the meantime.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one, uh, query but code is looking good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy with this PR so I'll leave my ack..Feel free to merge when all the other discussions are resolved to @jeremylenz 's satisfaction. 😸
I haven't tested on top of PF5 changes cause I was using a different environment for this one so be aware somethings may need to change when we switch to PF5.. @MariaAga 👀 |
hosts: { | ||
title: __('Hosts'), | ||
wrapper: ({ bootc_booted_image: bootcBootedImage, digests }) => ( | ||
<a href={`/hosts?search=bootc_booted_image%20=%20${bootcBootedImage}`}>{digests.reduce((total, digest) => total + digest.host_count, 0)}</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to respect the "New host overview page" Setting. Right now it always goes to the old hosts list page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good catch, I remember seeing this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact I think I hit it during the community demo :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
68d69da
to
7edac87
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err, I mean.. APGHA looks like the tests need fixing now |
Looks like using that setting broke the tests. |
7edac87
to
749a5e0
Compare
🍏 |
What are the changes introduced in this pull request?
Adds the "Booted container images" page. In the future it'll likely change to be the "Containers" page and merge with the new container images UI.
Within the page, there is a table that shows an overview of booted container images used by bootc hosts. The table shows the image name, number of digests within, and the number of hosts using that container image:
The last functionality-TODO is to make the rows expand and show the actual digests within. I also need to write tests.
Considerations taken when implementing this change?
I decided to use the newer TableIndexPage from Foreman since it's the new goodness.
This PR is built on top of #11257.
What are the testing steps for this pull request?